Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems

 

JScript Global Object eval Method

Evaluates JScript code.

Syntax: JScript Global Object eval Method

eval(codestring)

Arguments: JScript Global Object eval Method

codestring

A String object that contains valid JScript code. This string is parsed by the JScript parser and executed.

Remarks: JScript Global Object eval Method

The eval function allows dynamic execution of JScript source code. For example, the following code creates a new variable mydate that contains a Date object:

eval("var mydate = new Date();");

The code passed to the eval method is executed in the same context as the call to the eval method.

Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.